package com.shuziren.question.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;




import java.util.Date;

@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class InterviewCategoryDTO {
    // question_category 表的字段
    private Integer id;
    @NotNull(message = "名称不能为空")
    private String name;
    // 描述
    @Size(max = 255, message = "描述长度不能超过255")
    private String description;
    // 状态只有0和1，0表示禁用，1表示启用
    @Min(value = 0, message = "状态必须为0")
    @Max(value = 1, message = "状态必须为1")
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    // 额外的字段，用于存储题目数量
    private Integer questionCount;
}
